﻿package com.onebyonedesign.air.recents.events {
	
	import flash.events.Event;
	
	/**
	* Event dispatched by RecentItemManager when a Recent Item is selected in menu.
	* It contains a filePath property which is the full path to the file being opened.
	* @author Devon O.
	*/
	public class RecentItemEvent extends Event {
		
		public static const RECENT_SELECT:String = "recentSelect";
		
		private var _filePath:String;
		
		public function RecentItemEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { 
			super(type, bubbles, cancelable);
			
		} 
		
		public override function clone():Event { 
			return new RecentItemEvent(type, bubbles, cancelable);
		} 
		
		public override function toString():String { 
			return formatToString("RecentItemEvent", "type", "filePath", "bubbles", "cancelable", "eventPhase"); 
		}
		
		public function get filePath():String { return _filePath; }
		
		public function set filePath(value:String):void {
			_filePath = value;
		}
	}
}